using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class FriendGroup : GeneratedMessageLite<FriendGroup, FriendGroup.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<FriendGroup, FriendGroup.Builder>
		{
			private bool resultIsReadOnly;
			private FriendGroup result;
			protected override FriendGroup.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override FriendGroup MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override FriendGroup DefaultInstanceForType
			{
				get
				{
					return FriendGroup.DefaultInstance;
				}
			}
			public uint GroupId
			{
				get
				{
					return this.result.GroupId;
				}
				set
				{
					this.SetGroupId(value);
				}
			}
			public string GroupName
			{
				get
				{
					return this.result.GroupName;
				}
				set
				{
					this.SetGroupName(value);
				}
			}
			public Builder()
			{
				this.result = FriendGroup.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(FriendGroup cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private FriendGroup PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					FriendGroup other = this.result;
					this.result = new FriendGroup();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override FriendGroup.Builder Clear()
			{
				this.result = FriendGroup.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override FriendGroup.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new FriendGroup.Builder(this.result);
				}
				return new FriendGroup.Builder().MergeFrom(this.result);
			}
			public override FriendGroup BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override FriendGroup.Builder MergeFrom(IMessageLite other)
			{
				if (other is FriendGroup)
				{
					return this.MergeFrom((FriendGroup)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override FriendGroup.Builder MergeFrom(FriendGroup other)
			{
				return this;
			}
			public override FriendGroup.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override FriendGroup.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(FriendGroup._friendGroupFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = FriendGroup._friendGroupFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 8u)
					{
						if (num3 != 18u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							this.result.hasGroupName = input.ReadString(ref this.result.groupName_);
						}
					}
					else
					{
						this.result.hasGroupId = input.ReadUInt32(ref this.result.groupId_);
					}
				}
				return this;
			}
			public FriendGroup.Builder SetGroupId(uint value)
			{
				this.PrepareBuilder();
				this.result.hasGroupId = true;
				this.result.groupId_ = value;
				return this;
			}
			public FriendGroup.Builder ClearGroupId()
			{
				this.PrepareBuilder();
				this.result.hasGroupId = false;
				this.result.groupId_ = 0u;
				return this;
			}
			public FriendGroup.Builder SetGroupName(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasGroupName = true;
				this.result.groupName_ = value;
				return this;
			}
			public FriendGroup.Builder ClearGroupName()
			{
				this.PrepareBuilder();
				this.result.hasGroupName = false;
				this.result.groupName_ = "";
				return this;
			}
		}
		public const int GroupIdFieldNumber = 1;
		public const int GroupNameFieldNumber = 2;
		private static readonly FriendGroup defaultInstance;
		private static readonly string[] _friendGroupFieldNames;
		private static readonly uint[] _friendGroupFieldTags;
		private bool hasGroupId;
		private uint groupId_;
		private bool hasGroupName;
		private string groupName_ = "";
		private int memoizedSerializedSize = -1;
		public static FriendGroup DefaultInstance
		{
			get
			{
				return FriendGroup.defaultInstance;
			}
		}
		public override FriendGroup DefaultInstanceForType
		{
			get
			{
				return FriendGroup.DefaultInstance;
			}
		}
		protected override FriendGroup ThisMessage
		{
			get
			{
				return this;
			}
		}
		public uint GroupId
		{
			get
			{
				return this.groupId_;
			}
		}
		public string GroupName
		{
			get
			{
				return this.groupName_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasGroupId;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasGroupId)
				{
					num += CodedOutputStream.ComputeUInt32Size(1, this.GroupId);
				}
				if (this.hasGroupName)
				{
					num += CodedOutputStream.ComputeStringSize(2, this.GroupName);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private FriendGroup()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] friendGroupFieldNames = FriendGroup._friendGroupFieldNames;
			if (this.hasGroupId)
			{
				output.WriteUInt32(1, friendGroupFieldNames[0], this.GroupId);
			}
			if (this.hasGroupName)
			{
				output.WriteString(2, friendGroupFieldNames[1], this.GroupName);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasGroupId)
			{
				num ^= this.groupId_.GetHashCode();
			}
			if (this.hasGroupName)
			{
				num ^= this.groupName_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			FriendGroup friendGroup = value as FriendGroup;
			return friendGroup != null && (this.hasGroupId == friendGroup.hasGroupId && (!this.hasGroupId || this.groupId_.Equals(friendGroup.groupId_))) && (this.hasGroupName == friendGroup.hasGroupName && (!this.hasGroupName || this.groupName_.Equals(friendGroup.groupName_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<FriendGroup, FriendGroup.Builder>.PrintField("GroupId", this.hasGroupId, this.groupId_, writer);
			GeneratedMessageLite<FriendGroup, FriendGroup.Builder>.PrintField("GroupName", this.hasGroupName, this.groupName_, writer);
		}
		public static FriendGroup ParseFrom(byte[] data)
		{
			return FriendGroup.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private FriendGroup MakeReadOnly()
		{
			return this;
		}
		public static FriendGroup.Builder CreateBuilder()
		{
			return new FriendGroup.Builder();
		}
		public override FriendGroup.Builder ToBuilder()
		{
			return FriendGroup.CreateBuilder(this);
		}
		public override FriendGroup.Builder CreateBuilderForType()
		{
			return new FriendGroup.Builder();
		}
		public static FriendGroup.Builder CreateBuilder(FriendGroup prototype)
		{
			return new FriendGroup.Builder(prototype);
		}
		static FriendGroup()
		{
			FriendGroup.defaultInstance = new FriendGroup().MakeReadOnly();
			FriendGroup._friendGroupFieldNames = new string[]
			{
				"GroupId",
				"GroupName"
			};
			FriendGroup._friendGroupFieldTags = new uint[]
			{
				8u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.FriendGroup.Descriptor, null);
		}
	}
}
